Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanups, fixes, and speedups for the depscanner #13021

Merged

Conversation

dcbaker
Copy link
Member

@dcbaker dcbaker commented Mar 29, 2024

This is all work that's been pulled from #12539, but is perfectly fine as a standalone fixes with no user-facing changes. I'm hoping to land this sooner so that I don't have to continue to carry this for the two-step depscanner work

We don't need to write and pass two separate files to the depscanner,
I've used the pickle because the pickle serializer/deserializer should
be faster than JSON, thought I haven't tested.
We already have to decide whether to scan a file at configure time, so
we don't want to have to do it again at compile time, every time the
depscan rule is run. We can do this by saving and passing the language
to use in the pickle, so depscan doesn't have to re-calculate it. As an
added bonus, this removes an import from depscan
This basically existed for an assert which we don't need, as mypy would
catch that issue for us anyway. Removing the function entirely has some
small performance advantages
Which prevents spurious rebuilds of dyndeps
There's a known ninja bug
(ninja-build/ninja#1952) that running this
with dyndeps will result in Ninja deleting implicit outputs from the
dyndeps, leading to pointless rebuilds. For reference, this is what
CMake does as well.
@dcbaker dcbaker requested a review from jpakkane as a code owner March 29, 2024 20:09
@jpakkane jpakkane merged commit 516a485 into mesonbuild:master Mar 29, 2024
35 checks passed
@dcbaker dcbaker deleted the submit/depscanner-fixes-and-speedups branch March 29, 2024 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants